package com.erp.erp_dao.Dictionary;

import com.erp.erp_entitys.Dictionary.DictionaryEntity;
import com.erp.erp_entitys.Dictionary.DictionaryEntityExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IDictionaryDAO {
    long countByExample(DictionaryEntityExample example);

    int deleteByExample(DictionaryEntityExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(DictionaryEntity record);

    int insertSelective(DictionaryEntity record);

    List<DictionaryEntity> selectByExample(DictionaryEntityExample example);
    List<DictionaryEntity> queryAlllx();
    DictionaryEntity selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") DictionaryEntity record, @Param("example") DictionaryEntityExample example);

    int updateByExample(@Param("record") DictionaryEntity record, @Param("example") DictionaryEntityExample example);

    int updateByPrimaryKeySelective(DictionaryEntity record);

    int updateByPrimaryKey(DictionaryEntity record);

    /**
     * 根据 大类 小类 编码 获取字典实体
     * @param type
     * @param lx
     * @param code
     * @return
     */
    DictionaryEntity selectByParam(@Param("type") Integer type,
                                   @Param("lx") Integer lx,
                                   @Param("code") String code);
}